package com.dream.root.exchange.controller;

import com.dream.root.common.annotation.HttpApi;
import com.dream.root.common.response.BaseResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by liuhuan on 2018/7/29.
 */
@RestController
@RequestMapping("/demo")
@Slf4j
public class DemoController {



    @GetMapping("index")
//    @Cacheable(value = RedisKeys.tenSec)
    @HttpApi
    public BaseResponse test(@RequestParam("userId") Integer userId) {
        log.info("parameter is:" + userId);
        return new BaseResponse("hello");
    }
}


